﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Vecen.BangChuang.Migrations
{
    public partial class ChangeChargeIdType : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder) {
            migrationBuilder.DropTable("ChargeCredentials");

            migrationBuilder.CreateTable(
                name: "ChargeCredentials",
                columns: table => new
                {
                    Id = table.Column<string>(nullable: false),
                    Amount = table.Column<int>(nullable: true),
                    AmountRefunded = table.Column<int>(nullable: true),
                    AmountSettle = table.Column<int>(nullable: true),
                    App = table.Column<string>(nullable: true),
                    Body = table.Column<string>(nullable: true),
                    CallbackTime = table.Column<DateTime>(nullable: true),
                    Channel = table.Column<string>(nullable: true),
                    ClientIp = table.Column<string>(nullable: true),
                    Created = table.Column<int>(nullable: true),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    Credential = table.Column<string>(nullable: true),
                    Currency = table.Column<string>(nullable: true),
                    DeleterUserId = table.Column<long>(nullable: true),
                    DeletionTime = table.Column<DateTime>(nullable: true),
                    Description = table.Column<string>(nullable: true),
                    FailureCode = table.Column<string>(nullable: true),
                    FailureMsg = table.Column<string>(nullable: true),
                    IsDeleted = table.Column<bool>(nullable: false),
                    LastModificationTime = table.Column<DateTime>(nullable: true),
                    LastModifierUserId = table.Column<long>(nullable: true),
                    Livemode = table.Column<bool>(nullable: false),
                    OrderNo = table.Column<string>(nullable: true),
                    Paid = table.Column<bool>(nullable: false),
                    RealOrderNo = table.Column<int>(nullable: false),
                    Refunded = table.Column<bool>(nullable: false),
                    Subject = table.Column<string>(nullable: true),
                    TimeExpire = table.Column<int>(nullable: true),
                    TimePaid = table.Column<int>(nullable: true),
                    TimeSettle = table.Column<int>(nullable: true),
                    TransactionNo = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ChargeCredentials", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
        }
    }
}
